<?php

namespace App\Http\Controllers\Asset;

use App\Contracts\CacheKey;
use App\Http\Controllers\Controller;
use App\Models\AssetBrand;
use App\Models\AssetCategory;
use App\Models\AssetStatus;
use Cache;
use Illuminate\Http\Request;

class AssetMetaController extends Controller
{
    use AssetHelper;
    public function meta()
    {
        $data = [
            "assetCategories" => $this->getAllAssetCategories(),
            "assetStatus" => $this->getAllAssetStatus(),
            "assetBrands" => $this->getAssetBrands(),
            "assetAffiliations" => $this->getAllAssetAffiliations(),
            "assetKeepers" => $this->getAllAssetKeepers(),
            "assetVendors" => $this->getAllAssetVendors(),
            "assetLocations" => $this->getAllAssetLocations(),
            "assetStockChangeHistoryActions" => $this->getAllAssetStockChangeHistoryActions()
        ];
        return response()->json($data);
    }

    public function metaBrand()
    {
        $data = [
            "meta" => $this->getAssetBrands()
        ];
        return response()->json(compact(['data']));
    }

    public function metaAffiliation()
    {
        $data = [
            "meta" => $this->getAllAssetAffiliations()
        ];
        return response()->json(compact(['data']));
    }

    public function metaVendor()
    {
        $data = [
            "meta" => $this->getAllAssetVendors()
        ];
        return response()->json(compact(['data']));
    }

    public function metaKeeper()
    {
        $data = [
            "meta" => $this->getAllAssetKeepers()
        ];
        return response()->json(compact(['data']));
    }

    public function metaLocation()
    {
        $data = [
            "meta" => $this->getAllAssetLocations()
        ];
        return response()->json(compact(['data']));
    }

    public function metaAssetStockChangeHistoryActions()
    {
        $data = [
            "meta" => $this->getAllAssetStockChangeHistoryActions()
        ];
        return response()->json(compact(['data']));
    }



}
